package com.caocaog.market.controller;

import com.caocaog.market.entity.GoodsHis;
import com.caocaog.market.service.GoodsHisService;
import org.jeecg.common.system.base.controller.JeecgController;

/**
 * mk_goods_his
 *
 * @author  guofeiyan
 * @date 2021-11-20
 */

/*@Slf4j
@RestController
@RequiredArgsConstructor
@Api(value = "goodsHis", tags="商品历史表")
@RequestMapping("/goods/goodsHis")*/
@Deprecated
public class GoodsHisController extends JeecgController<GoodsHis, GoodsHisService> {
	/*@Autowired
	private GoodsHisService goodsHisService;
	
	*/
/**
	 * 分页列表查询
	 *
	 * @param goodsHis
	 * @param pageNo
	 * @param pageSize
	 * @param req
	 * @return
	 *//*

	@AutoLog(value = "mk_goods_his-分页列表查询")
	@ApiOperation(value="mk_goods_his-分页列表查询", notes="mk_goods_his-分页列表查询")
	@GetMapping(value = "/list")
	public Result<?> queryPageList(GoodsHis goodsHis,
								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
								   HttpServletRequest req) {
		QueryWrapper<GoodsHis> queryWrapper = QueryGenerator.initQueryWrapper(goodsHis, req.getParameterMap());
		Page<GoodsHis> page = new Page<GoodsHis>(pageNo, pageSize);
		IPage<GoodsHis> pageList = goodsHisService.page(page, queryWrapper);
		return Result.OK(pageList);
	}
	
	*/
/**
	 *   添加
	 *
	 * @param goodsHis
	 * @return
	 *//*

	@AutoLog(value = "mk_goods_his-添加")
	@ApiOperation(value="mk_goods_his-添加", notes="mk_goods_his-添加")
	@PostMapping(value = "/add")
	public Result<?> add(@RequestBody GoodsHis goodsHis) {
		goodsHisService.save(goodsHis);
		return Result.OK("添加成功！");
	}
	
	*/
/**
	 *  编辑
	 *
	 * @param goodsHis
	 * @return
	 *//*

	@AutoLog(value = "mk_goods_his-编辑")
	@ApiOperation(value="mk_goods_his-编辑", notes="mk_goods_his-编辑")
	@PutMapping(value = "/edit")
	public Result<?> edit(@RequestBody GoodsHis goodsHis) {
		goodsHisService.updateById(goodsHis);
		return Result.OK("编辑成功!");
	}
	
	*/
/**
	 *   通过id删除
	 *
	 * @param id
	 * @return
	 *//*

	@AutoLog(value = "mk_goods_his-通过id删除")
	@ApiOperation(value="mk_goods_his-通过id删除", notes="mk_goods_his-通过id删除")
	@DeleteMapping(value = "/delete")
	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
		goodsHisService.removeById(id);
		return Result.OK("删除成功!");
	}
	
	*/
/**
	 *  批量删除
	 *
	 * @param ids
	 * @return
	 *//*

	@AutoLog(value = "mk_goods_his-批量删除")
	@ApiOperation(value="mk_goods_his-批量删除", notes="mk_goods_his-批量删除")
	@DeleteMapping(value = "/deleteBatch")
	public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
		this.goodsHisService.removeByIds(Arrays.asList(ids.split(",")));
		return Result.OK("批量删除成功!");
	}
	
	*/
/**
	 * 通过id查询
	 *
	 * @param id
	 * @return
	 *//*

	@AutoLog(value = "mk_goods_his-通过id查询")
	@ApiOperation(value="mk_goods_his-通过id查询", notes="mk_goods_his-通过id查询")
	@GetMapping(value = "/queryById")
	public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
		GoodsHis goodsHis = goodsHisService.getById(id);
		if(goodsHis==null) {
			return Result.error("未找到对应数据");
		}
		return Result.OK(goodsHis);
	}

    */
/**
    * 导出excel
    *
    * @param request
    * @param goodsHis
    *//*

    @RequestMapping(value = "/exportXls")
    public ModelAndView exportXls(HttpServletRequest request, GoodsHis goodsHis) {
        return super.exportXls(request, goodsHis, GoodsHis.class, "mk_goods_his");
    }

    */
/**
      * 通过excel导入数据
    *
    * @param request
    * @param response
    * @return
    *//*

    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
        return super.importExcel(request, response, GoodsHis.class);
    }

*/}

